<template>
	<view class="goods-item">
	  <!-- 左侧图片 -->
	  <view class="goods-left">
	    <image :src="goodsItem.goods_small_logo||failImg"></image>
	  </view>
	  <!-- 右侧描述 -->
	  <view class="item-right">
	    <text>{{goodsItem.goods_name}}</text>
	    <text>￥{{goodsItem.goods_price | priceFilter}}</text>
	  </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				 failImg:'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png',//加载失败图片路径
			};
		},
    props:{
      goodsItem:{
        require:true,
        type:Object
      }
    }
    
	}
</script>

<style lang="scss">
  .goods-item {
    display: flex;
    padding: 20rpx 20rpx;
    border-bottom: 1px solid #efefef;
    .goods-left{
      image {
        width: 200rpx;
        height: 200rpx;
      }
    }
    .item-right {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      margin-left: 20rpx;
      text:first-child {
        font-size: 26rpx;
      }
      text:last-child {
        font-size: 28rpx;
        font-weight: bold;
        color: #C00000;
      }
    }
  }
</style>
